package com.acme.bankapp.service.bank;

import com.acme.bankapp.domain.bank.Bank;
import com.acme.bankapp.domain.bank.CheckingAccount;
import com.acme.bankapp.domain.bank.Client;
import com.acme.bankapp.domain.bank.Gender;
import com.acme.bankapp.domain.bank.SavingAccount;

public class BankApplication {
	private Bank db = new Bank();
		
	public static void main(String[] args) {
		BankApplication ba = new BankApplication();
		
		BankService.addClient(ba.db, new Client(new SavingAccount(10), "Ivanov", Gender.MALE));
		BankService.addClient(ba.db, new Client(new CheckingAccount(30,20), "Petrova", Gender.FEMALE));
		BankService.addClient(ba.db, new Client(new SavingAccount(20), "Sidorova", Gender.FEMALE));
		
		BankService.modifyBank(ba.db, 0, 30);
		BankService.modifyBank(ba.db, 0, -20);
		BankService.modifyBank(ba.db, 0, 30);
		BankService.modifyBank(ba.db, 1, -100);
		BankService.modifyBank(ba.db, 2, 30);
		
		BankService.printBalance(ba.db);
		
		System.out.println(Client.getClientSalutation(BankService.getClientById(ba.db, 1)));
	}
	
}
